package String;

import java.util.Locale;

public class Exercise {
    public static void main(String[] args) {







//                  0123456789012
        String str="www.baidu.com";
        int start=str.indexOf(".")+1;
        int end=str.indexOf(".",start);
        String name=str.substring(start,end);
        System.out.println(name);

        String d="www.tedu.com.cn";
        int start2=d.indexOf("w");
        int end2=d.indexOf("n",start)+1;
        String name2=d.substring(start2,end2);
        System.out.println(name2);


        String d1=d.toUpperCase();
        System.out.println(d1);
        String lower=d1.toLowerCase();
        System.out.println(lower);
        String qqq = str.toUpperCase();
        System.out.println(qqq);
        String www = str.toLowerCase();
        System.out.println(www);

        String yp="   ym   ";
        yp=yp.trim();
        System.out.println(yp);

        String wq="   aa    ";
        wq=wq.trim();
        System.out.println(wq);

        int a = 123;
        String s1 = String.valueOf(a);
        System.out.println(s1);

        double b = 3.1415926;
        String s2 = String.valueOf(b);
        System.out.println(s2);

        String s3 = b+"";
        System.out.println(s3);

        int a9 = 123;
        String s9 = String.valueOf(a);
        System.out.println(s9);

        double b9 = 3.1415926;
        String s8 = String.valueOf(b);
        System.out.println(s2);

        String s7 = b+"";
        System.out.println(s3);

/*
        StringBuilder s=new StringBuilder("a");
        for (int i=0;i<10000000;i++){
            s.append(i);
        }
        System.out.println("执行完毕");

        StringBuilder s1=new StringBuilder();
        for (int i=0;i<10000000;i++){
            s1.append(i);
        }
        System.out.println("执行完毕");
 */



/*
        //        0123456789012345
        String s="thinking in java";
        char a=s.charAt(11);
        System.out.println(a);

        //        012345678901
        String x="bibichengrui";
        char b=x.charAt(9);
        System.out.println(b);

        boolean s1=s.startsWith("think");
        System.out.println(s1);
        boolean s2=s.endsWith("  java");
        System.out.println(s2);

        StringBuilder builder=new StringBuilder(s);
        builder.append(",拿到满意的offer");
        System.out.println(builder);

        builder.replace(0,16,"好好学习java");
        System.out.println(builder);

        builder.delete(4,8);
        System.out.println(builder);

        builder.insert(4,",天天向上");
        System.out.println(builder);*/


        /*int index=s.indexOf("in");
        System.out.println(index);

        index=s.indexOf("in",5);
        System.out.println(index);

        index=s.lastIndexOf("in");
        System.out.println(index);


        int index=x.indexOf("i");
        System.out.println(index);

        index =x.lastIndexOf("i");
        System.out.println(index);*/

      /*String q= new String("hello");
        String q1= "hello";
        System.out.println(q==q1);
        System.out.println(q.equals(q1));

        String a="666888";
        String b="666888!";
        System.out.println(a==b);
        String c=a+"!";
        System.out.println(b==c);
        System.out.println(b.equals(c));

       */


      /*String aaa = "好好学习,天天向上";
        int len=aaa.length();
        System.out.println(len);

        String bbb = "吃饭不积极，脑子有问题";
        int le=bbb.length();
        System.out.println(le);*/

    }
}
